<?php
if( !defined('BASE') ) exit('Access Denied!');

/**
 * Obullo Framework (c) 2009.
 *
 * PHP5 MVC Framework software for PHP 5.2.4 or newer
 *
 * @package         obullo       
 * @author          obullo.com
 * @copyright       Ersin Güvenç (c) 2009.
 * @license         http://obullo.com/manual/license 
 * @since           Version 1.0
 * @filesource
 * @license
 */

// ------------------------------------------------------------------------

 /**
 * Obullo Super Static Controller Class
 *
 * @package     Obullo
 * @subpackage  Base
 * @category    System
 * @author      Ersin Güvenç
 * @link        
 */
 
class ob {  
    
    
    public static function instance()
    {
        return obullo::instance();
    }
    
    // --------------------------- INPUT CLASS --------------------------------
    
    
    public static function xss($str,$is_image = FALSE) 
    {   
        return obullo::instance()->input->xss_clean($str, $is_image); 
    }

    // ------------------------------------------------------------------------
    
    
    public static function post($key = '',$xss_clean = FALSE) 
    {   
        return obullo::instance()->input->post($key, $xss_clean); 
    }

    // ------------------------------------------------------------------------
    
    
    public static function get($key = '',$xss_clean = FALSE)
    { 
        return obullo::instance()->input->get($key, $xss_clean); 
    }

    // ------------------------------------------------------------------------
    
    
    public static function get_post($index = '',$xss_clean = FALSE)
    { 
        return obullo::instance()->input->get_post($index, $xss_clean); 
    }

    // ------------------------------------------------------------------------
    
    
    public static function server($index = '',$xss_clean = FALSE)
    { 
        return obullo::instance()->input->server($index, $xss_clean); 
    }
    
    // ------------------------------------------------------------------------
    
    
    public static function cookie($index = '',$xss_clean = FALSE)
    { 
        return obullo::instance()->input->cookie($index, $xss_clean); 
    } 
    
    // ------------------------------------------------------------------------

    public static function ip()
    {
         return obullo::instance()->input->ip_address(); 
    }

    // ------------------------------------------------------------------------
    
    
    public static function valid_ip($ip)
    { 
        return obullo::instance()->input->valid_ip($ip); 
    }
    
    // ------------------------------------------------------------------------

    public static function user_agent()
    { 
        return obullo::instance()->input->user_agent(); 
    }  

    // ---------------------------- URL CLASS ---------------------------------

    public static function uri_string()
    {   
        return obullo::instance()->uri->uri_string(); 
    }

    // ------------------------------------------------------------------------
    
    public static function segment($s, $no_result = FALSE)
    { 
        return obullo::instance()->uri->segment($s, $no_result); 
    }
    
    // -------------------------- SESSION CLASS -------------------------------
    
    public static function set_session($newdata = array(),$newval = '')
    { 
        return ob::instance()->session->set_userdata($newdata, $newval); 
    }
    
    // ------------------------------------------------------------------------
     
    public static function session($item) 
    { 
        return ob::instance()->session->userdata($item); 
    } 
    
    // ------------------------------------------------------------------------
    
    public static function unset_session($newdata) 
    { 
        return ob::instance()->session->unset_userdata($newdata); 
    } 
    
    // ------------------------------------------------------------------------
    
    public static function set_flash($newdata = array(), $newval = '')
    { 
        return ob::instance()->session->set_flashdata($newdata,$newval); 
    } 
    
    // ------------------------------------------------------------------------
    
    public static function flash($key) 
    { 
        return ob::instance()->session->flashdata($key); 
    }
    
    // ------------------------------------------------------------------------
    
    public static function keep_flash($key)
    { 
        return ob::instance()->session->keep_flashdata($key); 
    }
    
    // ------------------------------------------------------------------------
    
    public static function sess_destroy()
    { 
        return ob::instance()->session->sess_destroy(); 
    }
    
    // ------------------------------------------------------------------------
    
    public static function unset_userdata($newdata = array())
    { 
        return ob::instance()->session->unset_userdata($newdata); 
    }
    
    // --------------------------- LANG CLASS ---------------------------------
    
    public static function lang($item)
    { 
        return ob::instance()->lang->line($item); 
    }
    

    //---------------------------- URL HELPER ---------------------------------
      
    public static function index_page()
    { 
        return ob::instance()->config->item('index_page'); 
    }
        
    //---------------------- FORM VALIDATION CLASS ----------------------------
      
    public static function form_rules($field, $label = '', $rules = '') 
    { 
        return ob::instance()->form_validation->set_rules($field, $label, $rules); 
    }
    
    // ------------------------------------------------------------------------
    
    public static function form_validation($group = '')
    { 
        return ob::instance()->form_validation->run($group); 
    }
    
    // ------------------------------------------------------------------------
    
    public static function form_message($lang, $val = '') 
    { 
        return ob::instance()->form_validation->set_message($lang, $val); 
    }
        

} 
// END ob Class

/* End of file Ob.php */
/* Location: ./base/base/Ob.php */

?>
